package edu.szu.huhanpeng.doodlingFight.controller.preReg 
{
	import edu.szu.huhanpeng.doodlingFight.AppFacade;
	import edu.szu.huhanpeng.doodlingFight.controller.dataController.gameStart.HrFindGroupDc;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HMrExchange;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HMrGameStart;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HMrManageDone;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HMrRestartGame;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HMrTurnPlayer;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HMrUpdateActioner;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HrChangeFail;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HrGameOver;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HrShowMsgDlg;
	import edu.szu.huhanpeng.doodlingFight.controller.mainHandler.HSrTryToChange;
	import edu.szu.huhanpeng.doodlingFight.controller.showController.manageDone.WrRrFillEmptySquareSc;
	import edu.szu.huhanpeng.doodlingFight.globalConst.GlobalConst;
	import edu.szu.huhanpeng.doodlingFight.globalConst.NoteName;
	import org.puremvc.as3.interfaces.ICommand;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.interfaces.INotifier;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * 预注册cmd
	 * @author Huhanpeng
	 */
	public class PreRegCmd extends SimpleCommand implements ICommand, INotifier 
	{
		private static const NOTE_NAME:NoteName = GlobalConst.noteName;
		
		override public function execute(note:INotification):void 
		{
			
			
			//游戏状态
			facade.registerCommand( NOTE_NAME.GAME_START, HMrGameStart );
			
			//检查交换动作是否成功
			facade.registerCommand( NOTE_NAME.TRY_TO_CHANGE, HSrTryToChange );
			
			//交换动作成功后的处理
			facade.registerCommand( NOTE_NAME.EXCHANGE, HMrExchange );
			facade.registerCommand( NOTE_NAME.MANAGE_DONE, HMrManageDone );
			facade.registerCommand( NOTE_NAME.SHOW_FILL_SQUARE, WrRrFillEmptySquareSc );
			//交换动作失败后的处理
			facade.registerCommand( NOTE_NAME.CHANGE_FAIL, HrChangeFail );
			//facade.registerCommand( NOTE_NAME.FIND_GROUP, HrFindGroupDc );
			
			
			
			//新///
			//facade.registerCommand( NOTE_NAME.UPDATE_ACTIONER, HMrUpdateActioner );
			
			//用户信息对话框
			facade.registerCommand( NOTE_NAME.SHOW_MSG_DLG, HrShowMsgDlg );
			
			/////////////////////////////////////////////////////////////////////
			//游戏流程                                                         //
			/////////////////////////////////////////////////////////////////////
			facade.registerCommand( NOTE_NAME.GAME_OVER, HrGameOver );
			facade.registerCommand( NOTE_NAME.RESTRAR_GAME, HMrRestartGame )
			facade.registerCommand( NOTE_NAME.TURN_PLAYER, HMrTurnPlayer );
		}
		
	}

}